import request from '@/utils/request'

// 查询所有友链
export function LinkList() {
    return request({
      url: '/admin/link/LinkList',
      method: 'get'
    })
  }

  // 查询友链详细
export function getLink(linkId) {
    return request({
      url: '/admin/link/' + linkId,
      method: 'get'
    })
  }

  // 删除友链
export function delLink(linkId) {
    return request({
      url: '/admin/link/deleteLink',
      method: 'delete',
      data:linkId
    })
  }

  //新增友链
export function addLink(data) {
    return request({
      url: '/admin/link/addLink',
      method: 'post',
      data: data
    })
  }

  // 修改友链
export function updateLink(data) {
    return request({
      url: '/admin/link/updateLink',
      method: 'put',
      data: data
    })
  }